
{% extends "public/layout.html" %}

{% block breadcrumb %}
     <ol class="breadcrumb">
        <li>
            <a href="{% url 'index' %}">首页</a>
        </li>
         <li>
             <a>工单管理</a>
         </li>
        <li class="active">
            <strong>工单申请</strong>
        </li>
    </ol>
{% endblock %}


{% block body %}
<div  class="wrapper wrapper-content animated fadeInRight">
<div class="row">
    <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5> 工单申请 </h5>
                </div>
        
                  <div class="ibox-content">
                    <form method="post" action="{% url 'work_order:apply' %}" class="form-horizontal">
                            {% if errmsg %}
                                <div class="alert alert-danger alert-dismissable">
                                    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
                                    {{ errmsg | safe }}
                                </div> 
                            {% endif %}
                            <div class="form-group"><label class="col-sm-2 control-label">工单类型：</label>
                                <div class="col-sm-8">
                                    {{ forms.type }}
                                    {% if forms.type.errors %}<span  style="color:red">{{ forms.type.errors }}</span>{% endif %}

                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group"><label class="col-sm-2 control-label">工单标题：</label>
                                <div class="col-sm-8">
                                    {{ forms.title }}
                                    {% if forms.title.errors %}<span  style="color:red">{{ forms.title.errors }}</span>{% endif %}
                                </div>
                            </div>
                             <div class="hr-line-dashed"></div>
                             <div class="form-group"><label class="col-sm-2 control-label">详细内容：</label>
                                <div class="col-sm-8">
                            {# <textarea class="form-control" name ="order_contents" rows="8" placeholder="工单详细内容"></textarea>#}
                                    {{ forms.order_contents }}
                                    {% if forms.order_contents.errors %}<span  style="color:red">{{ forms.order_contents.errors }}</span>{% endif %}
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group"><label class="col-sm-2 control-label">指派人：</label>
                                <div class="col-sm-8">
                                    {{ forms.assign_to }}
                                    {% if forms.assign_to.errors %}<span  style="color:red">{{ forms.assign_to.errors }}</span>{% endif %}
                                </div> 
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button id="submit_button" class="btn btn-primary" type="submit">申请</button>
                                    <button class="btn btn-white" type="reset">取消</button>
                                </div> 
                            </div>
                        </form>

                </div>
            </div>
        </div>
    </div>
</div>




{% endblock %}

{% block js %}
{% endblock %}
